The display of text on pixel based computer displays requires a text definition to be in a rasterised form. In the past, characters to be displayed were stored on a computer device as a representation known as a “bitmap font”. A bitmap font provides a raster definition for each text character for required display sizes. Pixel elements for each raster definition are copied to memory corresponding to a display buffer for a display. In order to support multiple display sizes, scalable path definitions for the characters may be used and rasterisation is performed at time of usage at a desired display size.
One method of rasterisation that produces two-levels of intensity value is known as “point-sampling rasterisation”. The point-sampling rasterisation method produces a rasterisation by evaluating, at positions corresponding to pixel centres, whether the pixel centres are inside or outside of the outline (or “path”) defining a scalable path definition. Depending on whether the position is inside or outside the outline for the path definition, two different intensity values are assigned. Two-level intensity rasterisation has a limited number of intensity values and is often seen to be of a lower quality, as artefacts such as aliasing are often present. To improve quality, a method of rasterisation known as anti-aliased (AA) rasterisation may be employed.
One such method of anti-aliased rasterisation is known as “super-sampling”. Super-sampling uses multiple sampling positions to determine intensity value of each pixel. By utilising multiple samples per pixel, multiple intensity values can be derived for each pixel location. While super-sampling is effective in minimising artefacts relating to monochromatic rasterisation, such a method is expensive in terms of memory usage. Super-sampling is also slow with increasing multiplication values. Typically, a high quality anti-aliased rasterisation method utilises multiplication factors of at least eight in a horizontal and vertical direction. Such an anti-aliased rasterisation method is known as “8×8AA”.
Sampling provides an approximation of area of a pixel covered (or “coverage area”) by a character, whereby increasing sampling rate increases precision of a result. Theoretically, to increase the sampling rate to an infinite value would allow a rasterisation producing exact area coverage. However, using an infinite number (or a very large number) of samples is costly in terms of processing performance.
Area calculation methods that are not based on point sampling attempt to determine the coverage area for a pixel by firstly identifying a sub-shape corresponding to each pixel. The sub-shapes are pixel sized shapes that correspond to a single tile of a rendered shape where each tile is equal to the pixel size. When processing each pixel, all edges entering the pixel must be known at time of processing and geometric area of the shape is determined using a set of predetermined formulas. Due to its inherent complexity, such area calculation methods operate only on very primitive shapes. For example, it is possible to use such methods for processing triangular shapes used in 3D graphics accelerators. When triangular shapes are being rasterised, possible sub-shapes that may be produced include triangles, rectangles, squares (i.e., corresponding to pixels inside the shape) and trapeziums. While effective with rasterisation of simple shapes, area calculation methods require complex shapes to be reduced down to triangles before processing can be performed efficiently.
Other rasterisation methods rely on edge information associated with a pixel being available when the pixel is rasterised. Such methods, often use a scanline rendering algorithm to raster each row of output. When a pixel in a row is rasterised, edges intersecting the pixel are examined in order to determine area contribution. Depending on direction of the edges, calculated areas corresponding to each edge are either added or subtracted to reach a resulting coverage area. Edges corresponding to a path being rasterised need to be vectorised, and then sorted for each row. Sorting vectorised edges, checking the direction of edges at each pixel and making a determination whether to add or subtract, causes additional overhead which impacts performance.